package com.sy.common.service;

import com.alibaba.fastjson.JSONObject;
import com.sy.cloud.guess.model.*;
import com.sy.cloud.wechat.model.WechatUser;
import com.sy.cloud.wechat.model.Wxuser;
import com.sy.common.model.Juejinuser;
import com.sy.shiro.UsernameToken;

import java.util.List;
import java.util.Map;

/**
 * Created by mac on 2017/12/6.
 */
public interface ITestService {
    Juejinuser getJueUserById( String id );
    Juejinuser getJueUserByPhone( String phone );
    void addUser(Juejinuser juejinuser);
    void addPayOrder(PayOrder order);

    void updateUser(Juejinuser juejinuser );

    Double getMoney( String phone );
    // 下单接口
    boolean dealdb(List<JOrder> order);

    boolean updateGokguessnum(Gokguessnum gok);

    String getMaxIssue();
    String getNowIssue();

    void updateWinaOrLose(Integer issue,Gokguessnum gok);
    List<Heroset> getList();
    List<Object[]> getList3();
    Map<Integer,Double> oddsSet(String type);
    Map<String,Double> probaSet(String type);
    String getAccesstoken( String weixinId );
    void addModel(WechatUser wechatUser);
    WechatUser getWechatInfo( String openid );
    void getwxuser(String openId);
    Wxuser getWx(String token);
    Wxuser getWxByWxid( String weixinId );
    UsernameToken getUser();
    WxConfig getWxPayConfig(String plat);
    String getWxPaySecret(String mchtId);
    boolean vipMoney( double money, String ordersn  );
    boolean addMoney( double money, String ordersn );
    boolean addMoneyfail( String ordersn );
    boolean updateTiOrder( TiOrder tiOrder );
    boolean cashsuccess( double ptmoney, String ordersn );
    boolean cashfail( String ordersn, String remark);
    List<PayOrder> getPayList(String plat);
    List<TiOrder> getTiList(String plat);
    List<PayOrder> getPayList(String userid, String page);
    List<TiOrder> getTiList(String userid, String page);
    List<GiftExchange> getGiftlist( String userid, String page );

    boolean addCount(Count count);

    String addExchangeOrder( GiftExchange giftExchange );

    GiftExchange getGiftById( Integer id );


    JSONObject getKnapsackWinHero( Long userid );
    String getPasswdByPhone( String phone );

    Users getMemberByToken( String token );
    Users getAdUsersById( Integer id );

    void calcFeeForUser(String token,double ordermoney);

    // 兑换ticket
    boolean exchangeTicket( Juejinuser juejinuser, Integer chestId );

    //接受英雄卡，
    boolean KnapsackCardAdd(Juejinuser juejinuser, Integer herowin, String idFrom);
    //减少英雄卡，
    String KnapsackCardDelete(Juejinuser juejinuser, Integer herowin );

    // 验证签名是否正确，正确给该用户增加一张英雄卡
    boolean cardAdd( String ciph, String type, Juejinuser juejinuser);

    KnapgiftRecord getKnaByUserType(String UseId,String type);

}
